<?php

$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'), require(__DIR__ . '/../../common/config/params-local.php'), require(__DIR__ . '/params.php'), require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'apis',
    'basePath' => dirname(__DIR__),
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'bootstrap' => ['log'],
    'components' => [
        'request' => [
            'enableCsrfValidation' => false,
            'parsers' => [
                'application/json' => 'yii\web\JsonParser',
                'text/json' => 'yii\web\JsonParser',
            ]
        ],
        'response' => [
            'class' => 'yii\swoole\web\Response',
            'charset' => 'UTF-8',
        ],
        'urlManager' => require(__DIR__ . '/urlManager.php'),
        'user' => [
            'identityClass' => \apis\base\models\User::class,
            'enableAutoLogin' => false,
            'enableSession' => false
        ]
    ],
    'params' => $params
];
